Ext.define('Admin.view.role.group.RoleGroupForm', {
    extend: 'Ext.form.Panel',
    alias: 'widget.roleGroupForm',
    xtype: 'roleGroupForm',

    requires: [
        'Ext.form.field.Text',
        'Ext.form.field.File',
        'Ext.form.field.Date',
        'Ext.form.field.Radio',
        'Ext.button.Button'
    ],

    controller: 'roleGroupViewController',

    defaultType: 'textfield',

    layout: {
        type: 'vbox',
        align: 'stretch'
    },

    items: [{
        fieldLabel: '姓名',
        name: 'fullname',
        readOnly: true
    }, {
        fieldLabel: '部门',
        name: 'dept',
        readOnly: true
    }, {
        fieldLabel: '职位',
        name: 'job',
        readOnly: true
    }, {
        fieldLabel: '角色',
        xtype: 'combobox',
        name: 'role',
        displayField: "role",
        valueField: 'id',
        allowBlank: false,
        emptyText: '请选择...',
        blankText: '此项不能为空',
        editable: false,
        store: Ext.create('Admin.store.role.RoleStore')
    }],

    buttons: ['->',
        {
            text: '取消',
            listeners: {
                click: 'onFormCancelButton'
            }
        }, {
            text: '保存',
            formBind: true,
            ui: 'soft-green',
            listeners: {
                click: 'onFormSubmitButton'
            }
        }
    ]

});